Optimal. Leaf size=140 \[ \frac{b (2 n+1) (a+b x)^n (a-b x)^{-n} \, _2F_1\left (1,-n;1-n;\frac{a-b x}{a+b x}\right )}{n}-\frac{b 2^n (a+b x)^n \left (\frac{a+b x}{a}\right )^{-n} (a-b x)^{-n} \, _2F_1\left (-n,-n;1-n;\frac{a-b x}{2 a}\right )}{n}-\frac{(a+b x)^{n+1} (a-b x)^{-n}}{x} \]
[Out]
________________________________________________________________________________________
Rubi [C] time = 0.0374907, antiderivative size = 76, normalized size of antiderivative = 0.54, number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {137, 136} \[ \frac{b 2^{-n} (a-b x)^{-n} \left (\frac{a-b x}{a}\right )^n (a+b x)^{n+2} F_1\left (n+2;n,2;n+3;\frac{a+b x}{2 a},\frac{a+b x}{a}\right )}{a^2 (n+2)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 137
Rule 136
Rubi steps
\begin{align*} \int \frac{(a-b x)^{-n} (a+b x)^{1+n}}{x^2} \, dx &=\left (2^{-n} (a-b x)^{-n} \left (\frac{a-b x}{a}\right )^n\right ) \int \frac{(a+b x)^{1+n} \left (\frac{1}{2}-\frac{b x}{2 a}\right )^{-n}}{x^2} \, dx\\ &=\frac{2^{-n} b (a-b x)^{-n} \left (\frac{a-b x}{a}\right )^n (a+b x)^{2+n} F_1\left (2+n;n,2;3+n;\frac{a+b x}{2 a},\frac{a+b x}{a}\right )}{a^2 (2+n)}\\ \end{align*}
Mathematica [C] time = 0.24904, size = 146, normalized size = 1.04 \[ \frac{(a-b x)^{-n} (a+b x)^n \left (\frac{b 2^n (a-b x) \left (\frac{b x}{a}+1\right )^{-n} F_1\left (1-n;-n,1;2-n;\frac{a-b x}{2 a},1-\frac{b x}{a}\right )}{n-1}-\frac{a^2 \left (1-\frac{a}{b x}\right )^n \left (\frac{a}{b x}+1\right )^{-n} F_1\left (1;n,-n;2;\frac{a}{b x},-\frac{a}{b x}\right )}{x}\right )}{a} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.056, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( bx+a \right ) ^{1+n}}{{x}^{2} \left ( -bx+a \right ) ^{n}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b x + a\right )}^{n + 1}}{{\left (-b x + a\right )}^{n} x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (b x + a\right )}^{n + 1}}{{\left (-b x + a\right )}^{n} x^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b x + a\right )}^{n + 1}}{{\left (-b x + a\right )}^{n} x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]